#include "states.fx"

cbuffer cbPerObject
{
	float4x4 worldViewProjection;
};

struct VS_INPUT
{
   float4 position : POSITION;
   float3 Color : COLOR0;
};

struct VS_OUTPUT 
{
   float4 ScreenPos: SV_POSITION;
   float3 Color: TEXCOORD0;
};

VS_OUTPUT SimpleVS(VS_INPUT In)
{
    VS_OUTPUT Out = (VS_OUTPUT)0;

    Out.ScreenPos = mul(In.position, worldViewProjection);
    Out.Color = In.Color;

    return Out;
}

float4 SimplePS(VS_OUTPUT In):   SV_Target
{
    return float4(In.Color, 1);
}

technique10 Simple
{
   pass Single_Pass
   {
        SetVertexShader( CompileShader( vs_4_0, SimpleVS() ) );
		SetGeometryShader( NULL );
        SetPixelShader( CompileShader( ps_4_0, SimplePS() ) );
		
		SetBlendState(NoBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
		SetRasterizerState(CullNone);
		SetDepthStencilState(NoWriteDepth, 0);
   }
}